﻿<%@ Page Language="C#" MasterPageFile="~/Master/BookClub.Master" AutoEventWireup="true" CodeBehind="members.aspx.cs" EnableEventValidation="false" Inherits="BookClubIt.members"  %>
<%@ Register TagPrefix="uc" TagName="clubnav" Src="~/UserControls/clubmenu.ascx" %>
<%@ Register TagPrefix="uc" TagName="leaderbox" Src="~/UserControls/leaderbox.ascx"  %>
<%@ Register TagPrefix="uc" TagName="joinbox" Src="~/UserControls/joinbox.ascx"  %>
<%@ Register TagPrefix="uc" TagName="currentbook" Src="~/UserControls/currentbook.ascx"  %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div class="row">
<div class="left-nav">
<uc:clubnav id="clubnav"  runat="server" />
</div>

<div class="content">

<asp:Panel ID="pnlPendingMembers" runat="server" Visible="false">
<h2><small>Pending members</small></h2>
<p>The following members have requested to join your book club. Click 'approve' to allow them in or 'Deny' to deny them into your book club.</p>
<asp:GridView ID="grdPendingMembers"
 OnRowDataBound="grdPendingMembers_OnRowDataBound"
  runat="server"
   AutoGenerateColumns="false"
    AlternatingRowStyle-CssClass="alt"
     CssClass="table table-striped members-list"
     GridLines="None"
      ShowHeader="false"
       onrowcommand="grdPendingMembers_RowCommand"
       Visible="false">
<Columns>
    <asp:TemplateField ItemStyle-CssClass="avatar-row">
           <ItemTemplate>
        <asp:Image ID="imgUserAvatar" runat="server" Height="50px" Width="50px" />
           </ItemTemplate>
      </asp:TemplateField>

           <asp:TemplateField HeaderStyle-CssClass="main-link" ItemStyle-CssClass="main-link">
           <ItemTemplate>
           <asp:HyperLink ID="lnkUserProfile" runat="server" />
           </ItemTemplate>
      </asp:TemplateField>

        <asp:TemplateField  ItemStyle-CssClass="buttons">
           <ItemTemplate>
            <asp:LinkButton ID="lnkApproveMember" CssClass="btn btn-mini btn-success" runat="server" Text="Approve" CommandName="ApproveMember" />
            <asp:LinkButton ID="lnkDenyMember" CssClass="btn btn-mini btn-danger" runat="server" Text="Deny" CommandName="DenyMember" />
         <asp:HiddenField ID="hdnPendingRowUid" runat="server" />
        
           </ItemTemplate>
      </asp:TemplateField>
</Columns>
</asp:GridView>
</asp:Panel>
<h1><small><asp:Label ID="lblClubName" runat="server"/> Members</small></h1>

<asp:GridView ID="grdMemberList"
 OnRowDataBound="grdMemberList_OnRowDataBound"
  runat="server"
   AutoGenerateColumns="false"
    AlternatingRowStyle-CssClass="alt"
     CssClass="table table-striped members-list"
     GridLines="None"
      ShowHeader="false"
       onrowcommand="grdMemberList_RowCommand">
<Columns>


    <asp:TemplateField ItemStyle-CssClass="avatar-row">
           <ItemTemplate>
        <asp:Image ID="imgUserAvatar" runat="server" Height="50px" Width="50px" />
           </ItemTemplate>
      </asp:TemplateField>

           <asp:TemplateField HeaderStyle-CssClass="main-link" ItemStyle-CssClass="main-link">
           <ItemTemplate>
           <asp:HyperLink ID="lnkUserProfile" runat="server" />
            <asp:Label ID="lblJoinClubDate" runat="server" />
            <asp:Label ID="lblMemberStatus" runat="server" />
           </ItemTemplate>
      </asp:TemplateField>

        <asp:TemplateField  ItemStyle-CssClass="buttons">
           <ItemTemplate>
            <asp:LinkButton ID="lnkRemoveMember" CssClass="btn btn-mini btn-danger" runat="server" Text="remove" CommandName="RemoveMember" Visible="false" />
             <asp:LinkButton ID="lnkMakeLeader" CssClass="btn btn-mini btn-success" runat="server" Text="make leader" CommandName="MakeLeader" Visible="false" />
              <asp:LinkButton ID="lnkRemoveLeader" CssClass="btn btn-mini btn-warning" runat="server" Text="remove leader" CommandName="RemoveLeader" Visible="false" />
         <asp:HiddenField ID="hdnRowUid" runat="server" />
        
           </ItemTemplate>
      </asp:TemplateField>

</Columns>
</asp:GridView>


   <asp:panel ID="pnlAlertNoMembers" runat="server" CssClass="alert" Visible="False">
   <h3>You are the only member in this book club</h3>
   <p><a href="">Click here</a> to invite your friends to this book club.</p>
   </asp:panel>

  
</div>

<div class="right-sidebar">
<uc:joinbox id="joinbox"  runat="server" />
<uc:currentbook id="currentbook"  runat="server" />
<div class="sidebar_box">
<uc:leaderbox id="leaderbox"  runat="server" />
</div>

<script type="text/javascript"><!--
    google_ad_client = "ca-pub-1776925204000985";
    /* bci_new_right */
    google_ad_slot = "8771396277";
    google_ad_width = 250;
    google_ad_height = 250;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

</div>
</div>
</asp:Content>
